package com.example.nacosconsumer.client;

import com.example.nacosconsumer.fallback.EchoServiceFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "sentinel-nacos-provider",
        fallbackFactory = EchoServiceFallbackFactory.class)
public interface TestService {

    /**
     * 调用服务提供方的输出接口.
     * @param name 用户输入
     * @return echo result
     */
    @GetMapping(value = "/hello/{name}")
    public String hello(@PathVariable("name") String name);
}
